﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;

namespace Sustainalytics.Auth.Service
{
    public static class ClaimsExtensions
    {
        public static string GetUsername(this IEnumerable<Claim> claims)
            => claims.SingleOrDefault(x => x.Type == ClaimTypes.Email)?.Value;
    }
}
